import request from '@/utils/request'
//查询表别名记录
export function listTableAlias(query) {
  return request({
    url: '/tableAlias',
    method: 'get',
    params: query
  })
}

//更新数据
export function updateTableAlias(data){
  return request({
    url: '/tableAlias',
    method: 'put',
    data: data
  })
}

//批量保存
export function batchSave(data){
  return request({
    url:  '/tableAlias/batchUpdate',
    method: 'post',
    data: data
  })
}

//删除记录
export function delTableAlias(id){
  return request({
    url:  '/tableAlias?idList=' + id,
    method: 'delete'
  })
}

//同步数据源表到别名表
export function syncTables(data){
  return request({
    url:  '/tableAlias/syncTables',
    method: 'post',
    data: data
  })
}

//根据主键查询单条数据
export function getTableAlias(id){
  return request({
    url: '/tableAlias/' + id,
    method: 'get'
  })
}

